//!测试闭包中的this
// console.log(this);
// window.identify = 'My window';
// let object = {
//   identify:'My object',
//   showIdentify:function(){
//     return function(){
//       return this.identify
//     }
//   }
// }
// console.log(object.showIdentify()());//My window
// console.log('--------------------箭头函数-----------');
// window.identify="my window"
// function foo(){
//   this.identify = 'my foo';
//   return ()=>{
//     return this.identify;
//   }
// }
// console.log(foo()());//my foo

console.log('---------------------特殊情况------------');
window.identify = 'my window';
let object = {
  identify:"my object",
  showIdentify(){
    return this.identify;
  }
}
console.log(object.showIdentify());
console.log((object.showIdentify)());
console.log((object.showIdentify = object.showIdentify)());
console.log([);
//my object
//my object
//my window